import request from '@/utils/request'

// 查询订单列表
export function listOrder(query) {
  return request({
    url: '/system/order/listOrder',
    method: 'get',
    params: query
  })
}

// 查询订单列表 - 新
export function newListOrderApi(query) {
  return request({
    url: '/system/order/newListOrder',
    method: 'get',
    params: query
  })
}

// 查询订单列表 - 新
export function listOrder2Api(query) {
  return request({
    url: '/system/order/listOrder',
    method: 'get',
    params: query
  })
}

// 查询订单详细
export function getOrder(id) {
  return request({
    url: '/system/order/' + id,
    method: 'get'
  })
}

// 新增订单
export function addOrder(data) {
  return request({
    url: '/system/order',
    method: 'post',
    data: data
  })
}

// 修改订单
export function updateOrder(data) {
  return request({
    url: '/system/order',
    method: 'put',
    data: data
  })
}

// 删除订单
export function delOrder(data) {
  return request({
    url: 'system/order/cancelOrder',
    method: 'post',
    data
  })
}

// 查询订单详细
export function createSendOrderApi(data) {
  return request({
    url: 'system/order/createSendOrder',
    method: 'post',
    data: data
  })
}


// 送货单号
export function createNewSendOrderApi(data) {
  return request({
    url: 'system/order/createNewSendOrder',
    method: 'get',
  })
}

// 报春送货单
export function printNewSendOrderApi(data) {
  return request({
    url: 'system/order/printNewSendOrder',
    method: 'post',
    data
  })
}

// 根据送货单号  查询送货单信息
export function searchSendOrderApi(data) {
  return request({
    url: 'system/order/searchSendOrder',
    method: 'get',
    params: data
  })
}



